﻿<UserControl x:Class="Ewav.CombinedFrequency"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:GadgetSelector="clr-namespace:Ewav.ContextMenu;assembly=Ewav.ContextMenu.Menu"
	xmlns:Common="clr-namespace:CommonLibrary;assembly=CommonLibrary"
	mc:Ignorable="d"
	d:DesignHeight="600" d:DesignWidth="400"
	xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" 
	xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
             xmlns:ewav="clr-namespace:Ewav"
	DataContext="{Binding Source={StaticResource Locator}, Path=CombinedFrequencyViewModel}" >
     <Grid x:Name="LayoutRoot" Background="White" MouseRightButtonDown="LayoutRoot_MouseRightButtonDown" 
		  MouseLeftButtonDown="LayoutRoot_MouseLeftButtonDown" Margin="0,0,-145,0">




        <Grid x:Name="GadgetWindow" Background="White" MinWidth="500" >
			<Grid.RowDefinitions>
        		<RowDefinition Height="50"/>
        		<RowDefinition/>
        	</Grid.RowDefinitions>
        	<Grid.ColumnDefinitions>
        		<ColumnDefinition Width="Auto"/>
        		<ColumnDefinition/>
        	</Grid.ColumnDefinitions>

            <Rectangle x:Name="GWindow" Style="{StaticResource GWindow}" Grid.RowSpan="2" Stroke="{StaticResource WindowBrush}" StrokeThickness="4" Margin="0,0,-12,0" Grid.ColumnSpan="2" />
            <StackPanel d:LayoutOverrides="VerticalAlignment, GridBox" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="13,11,0,0">
                <TextBlock x:Name="GName" TextWrapping="Wrap" Text="Combined Frequency" VerticalAlignment="Top" Margin="0,0,26,0" Height="Auto" HorizontalAlignment="Left" Foreground="#FF2B4360" FontSize="21.333"/>

                <Rectangle x:Name="GHeader" VerticalAlignment="Top" Height="4" Margin="0,2,0,0" StrokeThickness="0" Fill="#FF00B050" />
            </StackPanel>
            <StackPanel HorizontalAlignment="Right" Margin="180,9,1,0" Orientation="Horizontal" VerticalAlignment="Top" Grid.Column="1">
                       <Button x:Name="FilterButton" Content="" Template="{StaticResource FilterButton}" Cursor="Hand"  Width="24" Height="24" Visibility="Visible" Click="FilterButton_Click" >
                	<Button.Effect>
                		<DropShadowEffect Color="#FFB0B0B0" ShadowDepth="1"/>
                	</Button.Effect>
                </Button>        
                <Button x:Name="HeaderButton" Content="" Template="{StaticResource HeaderButton}" Cursor="Hand" Click="HeaderButton_Click" Width="24" Height="24" >
                	<Button.Effect>
                		<DropShadowEffect Color="#FFB0B0B0" ShadowDepth="1"/>
                	</Button.Effect>
                </Button>
                <Button x:Name="ResizeButton" Content="" Template="{StaticResource resizebtn}" Cursor="Hand" Click="ResizeButton_Click" Width="24" Height="24" >
                    <Button.Effect>
                        <DropShadowEffect Color="#FFB0B0B0" ShadowDepth="1"/>
                    </Button.Effect>
                </Button>
                <Button x:Name="CloseButton" Content="" Template="{StaticResource CloseButton}" Cursor="Hand" Click="CloseButton_Click" Width="24" Height="24" >
                    <Button.Effect>
                        <DropShadowEffect Color="#FFB0B0B0" ShadowDepth="1"/>
                    </Button.Effect>
                </Button> 

            </StackPanel>
            <Grid x:Name="GadgetContentGrid" Margin="0,5,0,0" MinHeight="30" Grid.Row="1" Grid.ColumnSpan="2">
                <toolkit:Expander Margin="0,-45,122,10" VerticalAlignment="Top" 
				ExpandDirection="Down" IsExpanded="True" Style="{StaticResource ExpanderStyle1}" Canvas.ZIndex="999" HorizontalAlignment="Right" Width="188" x:Name="gadgetExpander">
                    <toolkit:Expander.Effect>
                        <DropShadowEffect Color="#FFB0B0B0" ShadowDepth="1"/>
                    </toolkit:Expander.Effect>

                    <toolkit:Expander.Header>
                        <TextBlock Text="Edit Properties" Cursor="Hand" Foreground="White"/>
                    </toolkit:Expander.Header>
                    <Grid Background="#FF5C53AC" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,-2,1,0">
                        <StackPanel VerticalAlignment="Top" HorizontalAlignment="Center" Width="175" Margin="2,7">
                            <TextBlock x:Name="tblockMainVariable" TextAlignment="Center" Text="Field:" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,0,0,0" Foreground="White"  />
                            <ComboBox x:Name="cbxField" Width="160" SelectedIndex="0" Height="25" Margin="5,3,0,0" VerticalAlignment="Top" HorizontalContentAlignment="Left" HorizontalAlignment="Left" UseLayoutRounding="False" SelectionChanged="cbxField_SelectionChanged" />

                            <!--<toolkit:WrapPanel x:Name="wrapPanel" Height="100" Width="200"  FlowDirection="LeftToRight"
                                                  ></toolkit:WrapPanel>-->
                            <toolkit:Expander x:Name="AdvancedOptions" Margin="0,10" ExpandDirection="Down" MouseLeftButtonDown="LayoutRoot_MouseRightButtonDown" Style="{StaticResource ExpanderStyle}" Foreground="White">
                                <toolkit:Expander.Header>
                                    <TextBlock Text="Advanced Options" Cursor="Hand" Foreground="White"/>
                                </toolkit:Expander.Header>
                                <StackPanel Orientation="Vertical" Margin="2" MinHeight="133" VerticalAlignment="Top">
                                    <TextBlock HorizontalAlignment="Left" TextAlignment="Center" Text="Stratify by:" Margin="0,5,0,0" Visibility="Collapsed" />
                                    <ComboBox x:Name="cmbFieldStrata" Width="120" HorizontalAlignment="Left" SelectedIndex="0" Visibility="Collapsed" />

                                    <TextBlock x:Name="tblockCombineMode" HorizontalAlignment="Left" TextAlignment="Center" Text="Combine mode:" Foreground="White" Margin="0,7,0,0" Visibility="Visible" />
                                    <ComboBox x:Name="cmbCombineMode" Width="160" HorizontalAlignment="Left" SelectedIndex="0" Visibility="Visible" Margin="0,0,0,0" Height="25" > <!--SelectionChanged="cmbCombineMode_SelectionChanged">-->
                                        <ComboBoxItem>Automatic</ComboBoxItem>
                                        <ComboBoxItem>Boolean</ComboBoxItem>
                                        <ComboBoxItem>Categorical</ComboBoxItem>
                                    </ComboBox>

                                    <TextBlock x:Name="tblockTrueValue" HorizontalAlignment="Left" TextAlignment="Center" Text="Value to treat as true:" Foreground="White" Margin="0,12,0,0" Visibility="Collapsed" />
                                    <TextBox x:Name="txtTrueValue" Width="180" HorizontalAlignment="Left" Visibility="Collapsed" />

                                    <CheckBox x:Name="checkboxSortHighLow" Margin="0,8,0,0" Content="Sort high to low" HorizontalAlignment="Left" IsChecked="true" Foreground="White" FontSize="13.333" />
                                    <CheckBox x:Name="checkboxShowDenominator" Margin="0,-4,0,0" Content="Show denominator" HorizontalAlignment="Left" IsChecked="true" FontSize="13.333" Checked="checkboxShowDenominator_Checked" Unchecked="checkboxShowDenominator_Unchecked" Foreground="White" />
                                </StackPanel>
                            </toolkit:Expander>
                            <Button x:Name="btnRun" Margin="0,7,0,11" HorizontalAlignment="Center" Style="{StaticResource btnSec}" Foreground="#D1FFFFFF" Height="28" Width="105" Content="Run Gadget" Click="btnRun_Click"/>
                        </StackPanel>
                    </Grid>
                </toolkit:Expander>

                <StackPanel x:Name="spContent" Orientation="Vertical" Margin="14,6,1,15">
                    <TextBlock x:Name="txtGadgetDescription" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="3,3,1,10" Visibility="Visible"    d:LayoutOverrides="HorizontalAlignment" MaxWidth="650" Padding="0,0,10,0"    />
                    <StackPanel x:Name="pnlStatus" Height="58" MaxHeight="40" Width="Auto" Background="#FFf8d7e2" VerticalAlignment="Top" Margin="0,5" Visibility="Collapsed">
                        <StackPanel x:Name="pnlStatusTop" Height="2" Width="Auto" Background="#FFe4658e"/>
                        <Image x:Name="ErrorIcon" Source="../../Images/error.png" Width="18" Height="18" HorizontalAlignment="Left" Margin="5,1,5,0" VerticalAlignment="Center"/>
                        <TextBlock x:Name="txtStatus" Text="Error: Exception occurred." TextWrapping="Wrap" Margin="30,-15,5,5" HorizontalAlignment="Left" FontWeight="Bold" VerticalAlignment="Center"/>
                    </StackPanel>
                    <StackPanel x:Name="panelMain" HorizontalAlignment="Left" VerticalAlignment="Top" >    
                        <!--<Grid>
							<Common:WaitCursor x:Name="waitCursor" Width="25" Height="25" Visibility="Collapsed"  HorizontalAlignment="Right" VerticalAlignment="Top"/>
						</Grid>-->
                        <!--<Grid x:Name="grdFreq" Width="Auto" HorizontalAlignment="Center" Margin="0,0,0,0">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="100"/>
                            </Grid.ColumnDefinitions>
                        </Grid>-->
                    </StackPanel>
                </StackPanel>
                <Grid x:Name="waitCursor" Background="#36C4C4C4" Height="Auto" Visibility="Collapsed">
                    <toolkit:BusyIndicator x:Name="BusyIndicator" IsBusy="True" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="100" />
                </Grid>
            </Grid>
        </Grid>
        <!--</groupBox:GroupBox>-->
        <!--<Image x:Name="imgClose" Source="Images\x.png" HorizontalAlignment="Right" VerticalAlignment="Top"/>-->
    </Grid>
</UserControl>

